package com.black.platform.permission.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.black.platform.base.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 权限实体类
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class Permission extends BaseEntity {

    /**
     * 权限代码
     **/
    @TableField("permission_code")
    private String permissionCode;

    /**
     * 权限名称
     **/
    @TableField("permission_name")
    private String permissionName;

    /**
     * 权限类型
     **/
    @TableField("permission_type")
    private String permissionType;

    /**
     * 系统代码
     **/
    @TableField("system_code")
    private String systemCode;

    /**
     * 父类Id
     **/
    @TableField("parent_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 菜单Id
     **/
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("menu_id")
    private Long menuId;

    /**
     * 同级序号
     **/
    private Integer orders;

    /**
     * 备注
     **/
    private String remark;
}